home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
mac
/
LOGIC Apple II 5.25" Library - ProDOS
/
PRO001.dsk
/
FIN
/
TRIP.COST.ANAL.bas
< prev
Wrap
BASIC Source File
|
2012-02-16
|
3KB
|
119 lines
3 HOME
5 PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT
8 SPEED= 255
10 PRINT " AN ORIGIONAL PROGRAM BY PAUL PAGE": PRINT : PRINT
15 PRINT " MAY 24,1978 "
20 GOSUB 110
25 HOME
28 SPEED= 150
30 PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : PRINT
32 PRINT : PRINT
35 PRINT TAB( 5)"TRIP EXPENSE ESTIMATING PROGRAM"
40 GOSUB 110
100 GOTO 1000
110 FOR I = 1 TO 5000
120 NEXT I
130 RETURN
150 FOR I = 1 TO N
155 PRINT
160 PRINT "CITY NUMBER ";I;
165 INPUT C$(I)
170 NEXT I
180 RETURN
200 FOR I = 1 TO N
220 PRINT "TRANS COST TO/FROM AIRPORT IN ";C$(I)
230 INPUT T(I)
235 IF T(I) = 0 THEN T(I) = 20
238 IF T(I) = 0 THEN T(I) = 0
240 NEXT I
245 RETURN
250 FOR I = 1 TO D -1
260 PRINT "HOTEL EXPENSES FOR NIGHT ";I;
270 INPUT "$";H(I)
280 NEXT I
290 RETURN
300 LET HT = (D -1) *37
320 RETURN
350 FOR I = 1 TO N
360 TT = T(I) +TT
370 NEXT I
375 TT = TT +T
380 RETURN
400 FOR I = 1 TO D
410 HT = HT +H(I)
420 NEXT I
430 RETURN
500 PRINT
510 PRINT "RENTAL CAR $"R *D
520 PRINT
530 PRINT "MISCELLANEOUS $"D *25
535 PRINT : PRINT
540 FLASH
550 PRINT "TOTAL EXPENSES ";
552 NORMAL
553 PRINT "$";
554 PRINT A +TT +HT +(F *D) +(R *D) +(D *25)
560 PRINT : PRINT
575 RETURN
1000 HOME
1005 PRINT : PRINT : PRINT : PRINT
1010 PRINT " THIS PROGRAM ESTIMATES THE EXPENSES"
1015 PRINT
1020 PRINT "OF A PROJECTED TRIP BASED ON ACTUAL"
1025 PRINT
1030 PRINT "KNOWN EXPENSES OR IF THESE ARE NOT"
1035 PRINT
1040 PRINT "KNOWN THEN EXPENSES ARE FIGURED ON"
1045 PRINT
1050 PRINT "AVERAGES FROM PREVIOUS TRIPS."
1055 PRINT
1060 PRINT : PRINT : PRINT : PRINT
1070 PRINT "HIT ANY KEY TO CONTINUE.....";
1080 GET Z$
1090 HOME
1092 PRINT : PRINT
1094 INPUT "HOW MANY PLACES ARE YOU GOING ?";N
1096 GOSUB 150
1175 PRINT : PRINT
1200 INPUT "TOTAL AIRFARE $";A
1203 PRINT
1204 PRINT "IF THE TRANSPORTATION COST ARE NOT"
1205 PRINT "KNOWN THEN ENTER '0' FOR COST": PRINT
1208 PRINT "IF THERE ARE NO TRANSPORTATION COST"
1209 PRINT "THEN ENTER '00' FOR COST": PRINT
1210 PRINT "TRANS COST TO/FROM BALTIMORE AIRPORT "
1215 INPUT T
1220 GOSUB 200
1300 INPUT "HOW MANY DAYS WILL YOU BE GONE ";D
1310 PRINT
1320 PRINT "ARE YOU GOING TO HAVE A RENTAL CAR Y/N";
1325 INPUT X$
1330 IF X$ = "Y" THEN INPUT "AMOUNT PER DAY";R
1332 PRINT
1335 PRINT "ARE THE HOTEL EXPENSES KNOWN Y/N "
1337 GET Y$
1340 IF Y$ = "Y" THEN GOSUB 250
1350 IF Y$ = "N" THEN GOSUB 300
1360 PRINT
1370 PRINT "WHAT IS YOUR ESTIMATED DAILY FOOD"
1380 PRINT "EXPENSE ALLOWANCE ";: INPUT F
1400 HOME
1410 PRINT : PRINT
1420 PRINT "***************************************": PRINT
1430 PRINT TAB( 10)"ESTIMATED TRIP EXPENSES": PRINT
1440 PRINT "***************************************"
1450 PRINT
1460 PRINT "TOTAL AIRFARE $";A
1462 PRINT
1465 GOSUB 350
1470 PRINT "TRANSPORTATION EXPENSES $";TT
1472 PRINT
1475 GOSUB 400
1480 PRINT "HOTEL EXPENSES $";HT
1482 PRINT
1490 PRINT "ESTIMATED MEAL EXPENSES $";F *D
1500 GOSUB 500
1520 PRINT "DO YOU WANT TO ENTER ANOTHER TRIP Y/N ";: INPUT N$
1525 IF N$ = "Y" THEN 1090
1530 PRINT " THANK YOU FOR USING THIS PROGRAM"
1550 SPEED= 255